package com.chinasoft.maysham.manager.repo;

import com.chinasoft.maysham.manager.model.ComponentInstance;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ComponentInstanceRepo extends BaseRepo {

    public long instanceNum(String componentId){
        return template.count(Query.query(Criteria.where("componentId").is(componentId).and("deleted").is(false)), ComponentInstance.class);
    }
}
